package com.yuba.front.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuba.common.mybatis.core.mapper.BaseMapperPlus;
import com.yuba.front.domain.FrontMessage;
import com.yuba.front.domain.vo.FrontMessageVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户消息通知Mapper接口
 *
 * @author modakai
 * @date 2024-12-21
 */
public interface FrontMessageMapper extends BaseMapperPlus<FrontMessage, FrontMessageVo> {



    List<FrontMessageVo> selecRedList(Long userId);

    Page<FrontMessageVo> pageList(@Param("page") Page<FrontMessageVo> pageQuery, @Param("userId") Long userId, @Param("types") List<String> types);

    /**
     * 更新已读状态
     * @param ids 消息列表
     * @return 更新数量
     */
    Long updateReads(List<Long> ids);
}
